package edu.hcmus.sow.dao;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import edu.hcmus.sow.domain.Project;

/**
 * DAO to manage Project entities.
 * 
 */
@Repository
@Transactional
public class ProjectDAOImpl extends AbstractHibernateDAO<Project, Integer> implements ProjectDAO {
   public List<Project> getByClientID(Integer clientID) throws DataAccessException {
      List<Project> list = findByCriteria(Restrictions.eq("clientID", clientID));
      return list;
   }
}
